package com.ruantu.clothing.util;

/**
 * 防止sql注入
 */
public class SQLTools {

    public static String transfer(String keyWord) {

        if (keyWord.contains("%") || keyWord.contains("_")) {

            keyWord = keyWord.replaceAll("\\\\", "\\\\\\\\").replaceAll("\\%", "\\\\%").replaceAll("\\_", "\\\\_");

        }
        return keyWord;
    }


}